package com.ktjiaotu.example.example02And04;

/**
 * @Author: DABINGCHNEGJIAO
 * @CreateTime: 2025-06-06
 * @Description:
 * @Version: 1.0
 */

@Hour(hour = 4)
@Hour(hour = 4.5)
@Hour(hour = 2)
public class Worker {
    public static void main(String[] args) {
        //第一种写法
//        Hours[] hours = Worker.class.getDeclaredAnnotationsByType(Hours.class);
//        for (Hours hour : hours) {
//            System.out.println( hour);
//        }

        //第二种写法
//        Hours annotation = Worker.class.getAnnotation(Hours.class);
//        for (Hour hour : annotation.value()) {
//            System.out.println(hour);
//        }
    }
}
